#{extends 'main.html' /}
#{set title:'Control Panel' /}

#{if flash.success || flash.error || errors}
	<p class="success">${flash.success}</p>
	<p class="error">#{errors}${error}<br />#{/errors}</p>
#{/if}
<form action="@{Account.save()}">
#{if user instanceof models.Student}<div class="field"><label>ID</label><input type="text" disabled value="${user.studentID}" /></div>#{/if}
<div class="field"><label>Username</label><input type="text" disabled value="${user.username}" /></div>
<div class="field"><div class="more_info _bbb tiny_info">The <b>above</b> information are unchangeable.</div></div>
<div class="field"><label>Email</label><input type="text" value="${user.email}" name="email"/></div>
<div class="field"><div class="more_info _bbb tiny_info">Use an email you check frequently. This does <b>NOT</b> have to be your GUC email.</div></div>
<div class="field"><label>Password</label><input type="password" name="password"/></div>
<div class="field"><label>Confirm Password</label><input type="password" name="password2"/></div>
<div class="field"><div class="more_info _bbb tiny_info">Just like your underwear, change your password every once in a while.</div></div>
#{if user instanceof models.Instructor}
<h3>Student Account</h3>
<div class="field"><label>Username</label><input type="text" disabled name="notConsideredAtAllReally" value="${user.studentAccount.username}" /></div>
<div class="field"><label>Email</label><input type="text" value="${user.studentAccount.email}" name="stEmail"/></div>
<div class="field"><label>Password</label><input type="password" name="stPassword"/></div>
<div class="field"><label>Confirm Password</label><input type="password" name="stPassword2"/></div>
#{/if}
<div class="field"><input type="submit" value="Save information"/></div>
</form>